<template>
  <div class="error-page">
    <div class="img err-developing"></div>
    <div class="content">
      <h1>已经在新窗口打开当前页面</h1>
      <div class="desc">点击 <a>打开</a> 可再次在新窗口打开该页面</div>
      <div class="actions">
        <el-button type="primary" @click="goHome">返回首页</el-button>
        <el-button text @click="goBack">返回上一页</el-button>
        <el-button text @click="refresh">刷新</el-button>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts" name="ErrorNewWindow">
import router from '@/router/index'

const goHome = () => {
  router.push({
    path: '/',
  })
}
const goBack = () => {
  router.go(-1)
}
const refresh = () => {
  location.reload()
}
</script>

<style lang="scss" scoped>
.error-page {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.error-page .img {
  margin-right: 80px;
  height: 300px;
  width: 100%;
  max-width: 430px;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: contain;
}

.error-page .content h1 {
  color: #434e59;
  font-size: 72px;
  font-weight: 600;
  line-height: 72px;
  margin-bottom: 24px;
}

.error-page .content .desc {
  color: rgba(0, 0, 0, 0.45);
  font-size: 20px;
  line-height: 28px;
  margin-bottom: 16px;
}

.err-developing {
  background-image: url('../../assets/img/error/developing.svg');
}
</style>
